<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- <li>
			<li mean='热情'>red</li>
			<li mean='冷静'>green</li>
			<li mean='生机'>blue</li>
		</li> -->
		
		<script type="text/javascript">
			window.onload = function(){
			    var colors = ['red','green','blue'];
			    var colorMeans = ['热情','冷静','生机'];
			    var ul =document.createElement('ul');
			    for(var i = 0;i < colors.length;i++){
				   var li = document.createElement('li');
				   li.setAttribute('mean',colorMeans[i]);
				   var txt = document.createTextNode(colors[i]);
				   li.appendChild(txt);
				   ul.appendChild(li);
			    }
			    document.body.appendChild(ul);
			    for (var k in colors){
				    console.log(k);
			    }	
			}
			
		</script>
	</body>
</html>